package com.zhentao.controller;

import com.zhentao.common.dtos.ResponseResult;
import com.zhentao.service.CheckinsService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Date;

@Api("api/wx/checkins")
@RestController
@RequestMapping("api/wx/checkins")
public class CheckinsController {
    @Autowired
    private CheckinsService checkinsService;

    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "query", dataType = "int", name = "id", value = "", required = true),
            @ApiImplicitParam(paramType = "query", dataType = "string", name = "days", value = "", required = true)
    })
    @ApiOperation(value = "", notes = "", httpMethod = "GET")
    @GetMapping("auth/checkinsDays")
    public ResponseResult checkinsDays(@RequestParam("id") Integer id, @RequestParam("days") String days){
        return checkinsService.checkinsDays(id,days);
    }


}
